<@_sysDatasourceList disabled=disabled orderType=orderType pageIndex=pageNum pageSize=numPerPage>
<div class="pageHeader">
    <form class="pagerForm" autocomplete="off" onsubmit="return navTabSearch(this);" method="post">
        <#include "../include_page/parameters.html"/>
        <div class="searchBar">
            <ul class="searchContent">
                <#include "../include_page/disabled.html"/>
            </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <button type="submit" class="buttonActive"><@t.page 'button.search'/></button>
                    </li>
                </ul>
            </div>
        </div>
    </form>
</div>
<@_sysAuthorized roleIds=admin.roles urls='sysDatasource/add,sysDatasource/delete'><#assign authorizedMap=map/></@_sysAuthorized>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
            <li><a href="sysDatasource/add.html" target="navTab" rel="sysDatasource/add"><i class="icon-plus-sign-alt icon-large"></i> <@t.page 'button.add'/></a></li>
        </ul>
    </div>
    <table class="table" width="100%" layoutH="92">
        <thead>
            <tr>
                <th><@t.page 'name'/></th>
                <th orderField="createDate" class="<#if orderField?has_content&&'createDate'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>"><@t.page 'create_date'/></th>
                <th><@t.page 'update_date'/></th>
                <th><@t.page 'disabled'/></th>
                <th><@t.page 'operate'/></th>
            </tr>
        </thead>
        <tbody>
            <#list page.list as a>
            <tr>
                <td>${a.name!}</td>
                <td>${a.createDate!}</td>
                <td>${a.updateDate!}</td>
                <td>${(a.disabled)?then('<font color="red">'+t.pageMessage('disabled')+'</font>',t.pageMessage('normal'))?no_esc}</td>
                <td>
                    <a href="sysDatasource/add.html?id=${a.name}" class="edit btnText blue" target="navTab" rel="sysDatasource/edit"><i class="icon-edit"></i> <@t.page 'button.edit'/></a>
                    <#if !a.disabled>
                        <a href="sysDatasource/sync?id=${a.name}&_csrf=<@_csrfToken admin=true/>" class="btnText green" target="ajaxTodo"><i class="icon-refresh"></i> <@t.page 'data_sync'/></a>
                        <a href="sysDatasource/disable?id=${a.name}&_csrf=<@_csrfToken admin=true/>" class="btnText red" title="<@t.page 'confirm.disable'/>" target="ajaxTodo"><i class="icon-ban-circle"></i> <@t.page 'button.disable'/></a>
                    </#if>
                </td>
            </tr>
            </#list>
        </tbody>
    </table>
    <#include "../include_page/page.html"/>
</div>
</@_sysDatasourceList>